package IO;

import java.io.*;
import java.nio.charset.StandardCharsets;

//字符流写入
public class OSWDemo {
    public static void main(String[] args) throws IOException {
        //文本写入osw.txt写入文本数据
        FileOutputStream fos = new FileOutputStream("./File/osw.txt",true);
        OutputStreamWriter osw = new OutputStreamWriter(fos, StandardCharsets.UTF_8);
//        osw.write("天青色等烟雨，");
        osw.write("而我在等你,");
        osw.write("月色被打捞起,");

        System.out.println("写出完毕");
        osw.close();
    }
}
